#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;
class Solution {
public:
    int hammingWeight(int n)
    {
        int i = 1;
        int count = 0;
        while (n)
        {
            if ((n & 1) == 1) ++count;
            n >>= 1;
        }
        return count;
    }
};
int main()
{
    Solution s;
    cout<<s.hammingWeight(3);
    return 0;
}
